package com.tm.d13_lambda;
/**
 * 2024/5/25 学习Lambda表达式 Cjj 15:28
 */
public class LambdaTest1 {
    public static void main(String[] args) {
/*      Animal a=  new Animal() {
            @Override
            public void run() {
              System.out.println("熊猫睡觉~~");
            }
        };
           a.run();*/

  /*   Swimming  s= new Swimming(){

            @Override
            public void swim() {
                System.out.println("学生游泳~~");
            }
        };*/

      Sleeping s=()->{
         System.out.println("睡觉~");
        };
        s.sleep();

     Swimming a=()->{
         System.out.println("学生游泳啦~");
        };
     a.swimm();
}
}

interface Swimming{
    void swimm();
}

interface Sleeping{
    void sleep();
}

abstract class Animal{
    public abstract void run();
}
